package com.wxyzz.canteenadmin.vip.entity.member.dto;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class MemberAddDTO {
    @NotBlank(message = "会员名称不能为空")
    private String name;
    /**
     * 手机号
     */
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",message = "⼿机号码格式不正确")
    private String phone;
    //会员等级
    private String gradeId;

    //所属店铺
    private String belongingStoreId;

    //会员余额
    @Min(value = 0, message = "金额不能小于0")
    @NotNull(message = "金额称不能为空")
    private Integer balance;

    private String imageUrl;

}
